package com.ms.education.order.service.feign;

import com.ms.education.R;
import com.ms.education.handler.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>Project:education-CourseFeignService
 * <p>Powered by ms on 2023-02-16 18:00:18
 *
 * @author ms
 * @version 1.0
 * @since 1.8
 */
@Component
@FeignClient(value = "service-course",configuration = FeignInterceptor.class)
public interface CourseFeignService {
    @GetMapping("/course/course/getCourseById/{id}")
    @ResponseBody
    public R getCourseById(@PathVariable("id") Integer id,
                           @RequestParam Boolean isContainChapter,
                           @RequestParam Boolean isContainComment);

    @PutMapping("/course/course-collect/collectCourse/{courseId}")
    @ResponseBody
    public R collectCourse(@PathVariable("courseId") Integer courseId);

    @GetMapping("/course/class/getClassById/{classId}")
    @ResponseBody
    public R getClassById(@PathVariable("classId") Integer classId);

    @PutMapping("/course/front/class/userInClass/{classId}")
    @ResponseBody
    public R userInClass(@PathVariable("classId") Integer classId);

}
